import Vue from 'vue'
import VueRouter from 'vue-router'
import test from '../components/test'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/test',
    name: 'test',
    component: test
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue')
  },
  {
    path: '/views/swiper/myIndex',
    name: 'myIndex',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/swiper/myIndex.vue')
  },
  {
    path: '/views/swiper/vue-awesome-swiper',
    name: 'vue-awesome-swiper',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/awesomeswiper/AweSomeSwiper.vue'
      )
  },
  {
    path: '/views/swiper/vue-awesome-swiper/index',
    name: 'vue-awesome-swiper-index',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/awesomeswiper/index.vue'
      )
  },
  {
    path: '/views/swiper/vant-swiper',
    name: 'vue-awesome-swiper',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/vantswiper/VantSwiper.vue'
      )
  },
  {
    path: '/views/swiper/vant-swiper-index',
    name: 'vant-swiper-index',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/vantswiper/index.vue'
      )
  },
  {
    path: '/views/swiper/vue-touch',
    name: 'vue-touch',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/vuetouch/VueTouch.vue'
      )
  },
  {
    path: '/views/swiper/vue-touch/index',
    name: 'vue-touch-index',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/swiper/vuetouch/index.vue'
      )
  },
  {
    path: '/views/forms/validForm',
    name: 'validForm',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/forms/validForm.vue')
  },
  {
    name: 'AsyncIndex',
    path: '/views/async/index',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/async/index.vue')
  },
  {
    name: 'GeneratorTest',
    path: '/views/async/generator-test',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/async/GeneratorTest.vue')
  },
  {
    name: 'PromiseTest',
    path: '/views/async/promise-test',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/async/PromiseTest.vue')
  },
  {
    name: 'AsyncTest',
    path: '/views/async/asynctest',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/async/AsyncTest.vue')
  },
  {
    name: 'ocr-index',
    path: '/views/ocr/index',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/ocr/index.vue')
  },
  {
    name: 'IDcardOCR',
    path: '/views/ocr/idcard-ocr',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/ocr/IDcardOCR.vue')
  },
  {
    name: 'vuestoretest',
    path: '/views/store/index',
    component: () =>
      import(
        /* webpackChunkName: "about" */ '../views/vuestore/vuestoretest.vue'
      )
  },
  {
    name: 'iconIndex',
    path: '/views/icon/index',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/icon/index.vue')
  },
  {
    name: 'iconText',
    path: '/views/icon/icon-text',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/icon/iconText.vue')
  },
  {
    name: 'shape',
    path: '/views/icon/shape',
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/icon/shape.vue')
  }
]

const router = new VueRouter({
  // mode: 'history',
  routes
})

export default router
